CGI Demo by Chuck Shotton, cshotton@oac.hsc.uth.tmc.edu
This stack demonstrates how MacHTTP can pass arguments to HyperCard for processing. Specifically, this stack shows how to utilize the "CGI" (common gateway interface) AppleEvent sent by MacHTTP to applications. Edit the script of this stack and the "test_hc_form.html" file for more details.
Running the demo:
1. Place an alias to HyperCard 2.1 (or greater) in the same folder as MacHTTP. Name the alias "HyperCard.cgi".
2. Drag this stack over the HyperCard alias and drop it.
3. Run MacHTTP 1.3.1b8 or later. (if you want the POST method to work)
4. Access MacHTTP from your WWW client, using the URL:
http://your.address/test_hc_form.html
Helpful hints
• Use the path args (stuff after the "$" in a MacHTTP URL) to distinguish between multiple forms or searches, allowing HyperCard to handle multiple forms, etc.
• Take advantage of HyperCard's "item delimiters" property to make parsing form args easier.